package com.emergency.http;

public enum DefaultResponseCode implements ResponseCode {

    /**
     * NOT_LOGGED_IN
     */
    NOT_LOGGED_IN(1001, "用户未登录"),

    /**
     * INSUFFICIENT_AUTHORITY
     */
    INSUFFICIENT_AUTHORITY(1002, "权限不足"),

    REQUEST_TIMEOUT(1003, "请求超时"),

    SUCCESS(200, "请求成功"),

    LOGIN_SUCCESS(200, "登录成功"),

    LOGIN_FAIL(201, "登录失败"),

    TOKEN_TIME_OUT(300, "==== token 过期 ====="),

    TOKEN_PARSE_EXCEPTION(300, "==== token 解析异常 ====="),

    USER_NOT_EXIST(201, "账户名不存在"),

    PASSWORD_NOT_CORRECT(201, "密码错误"),

    PASSWORD_CAN_NOT_CONSISTENT(201, "新密码不能与旧密码一致"),

    NOT_FOUND(404, "数据不存在"),

    ERROR(500, "网络异常"),

    FAIL(500, "请求失败"),

    ILLEGAL_ARGUMENT(1000, "参数异常"),

    ILLEGAL_ARGUMENT_CUSTOM(1000, "{}"),

    DELETE_SUCCESS(200, "删除成功"),

    SAVE_SUCCESS(200, "保存成功"),

    OPERATE_SUCCESS(200, "操作成功"),

    DELETE_FAIL(1004, "删除失败"),

    SAVE_FAIL(1005, "保存失败"),

    UPDATE_SUCCESS(200, "修改成功"),

    LINKMAN_POINT_NOT_EXIST(201, "负责人联络点不存在"),

    RESCUE_TEAM_NOT_EXIST(201, "救援队伍不存在"),

    EMERGENCY_SUPPLIES_POINT_NOT_EXIST(201, "应急物资点不存在"),

    SETTLEMENT_POINT_NOT_EXIST(201, "避灾安置点不存在"),

    EMERGENCY_RESPONSE_IS_START(201, "已存在启动中应急响应"),

    EMERGENCY_RESPONSE_IS_NOT_EXIST(201, "应急响应记录不存在"),

    EMERGENCY_RESPONSE_CONFIRM_IS_NOT_EXIST(201, "部门应急响应确认记录不存在"),

    AFFECTEDPOINTIS_NOT_EXIST(201, "受灾点不存在");

    int code;

    String message;

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    DefaultResponseCode(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
